// API响应类型定义

export interface ApiResponse<T = any> {
  success: boolean;
  message?: string;
  data?: T;
  count?: number;
}

export interface NotificationData {
  id: number;
  title: string;
  content: string;
  summary: string;
  type: string;
  is_read: boolean;
  related_id?: number;
  related_type?: string;
  action_url?: string;
  created_at: string;
}

export interface UserData {
  id: number;
  username: string;
  email: string;
  avatar?: string;
  grade?: string;
  major?: string;
  dream_career?: string;
  bio?: string;
}

export interface LoginResponse {
  message: string;
  token: string;
  user: UserData;
}

export interface CreateTestNotificationResponse {
  success: boolean;
  message: string;
  count: number;
}

// 云盘存储相关类型
export interface FileItem {
  id: number;
  file_name: string;
  file_size: number;
  mime_type: string;
  created_at: string;
  download_count: number;
  is_shared: boolean | null;
  parent_folder_name?: string;
}

export interface FolderItem {
  id: number;
  folder_name: string;
  folder_path?: string;
  created_at: string;
  is_shared: boolean | null;
}

export interface StorageStats {
  quota: {
    total_quota: number;
    used_quota: number;
    file_count: number;
    folder_count: number;
  };
  stats: {
    total_files: number;
    total_size: number;
    avg_size: number;
  };
  recentFiles: FileItem[];
}

export interface ShareLinkResponse {
  success: boolean;
  shareToken: string;
  shareUrl: string;
  message?: string;
  error?: string;
}
